package com.fingerth.crawler.room

import androidx.room.*

@Dao
interface UserDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(users: User)

    @Delete
    fun delete(vararg users: User)

    @Update(onConflict = OnConflictStrategy.REPLACE)
    fun update(users: User):Int

    @Query("SELECT * FROM user")
    fun query(): Array<User>

    @Query("SELECT * FROM user WHERE status == :status")
    fun queryAccount(status: Int): Array<User>

}